﻿<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="f" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><title>
	权限赋予
</title><link href="../Styles/css.css" rel="stylesheet" type="text/css" /><link href="../Styles/ts_css.css" rel="stylesheet" type="text/css" />
    <script src="../Scripts/jquery.js" type="text/javascript"></script>
    <script src="../Scripts/jquery.hotkeys.js" type="text/javascript"></script>
    <!-- <script src="Scripts/jstree/jquery.jstree.js" type="text/javascript"></script> -->
    <script src="../Scripts/jquery.cookie.js" type="text/javascript"></script>
    <!-- <script src="Scripts/OrganizationsManager.js" type="text/javascript"></script> -->
</head>
<body style="overflow-x: hidden; background: #EFF3FF; width: 100%">
    <form method="post" action="OrganizationsManager.htm" id="form1">

 
<script type="text/javascript"> 
    var theForm = document.forms['form1'];
    if (!theForm) {
        theForm = document.form1;
    }
    function __doPostBack(eventTarget, eventArgument) {
        if (!theForm.onsubmit || (theForm.onsubmit() != false)) {
            theForm.__EVENTTARGET.value = eventTarget;
            theForm.__EVENTARGUMENT.value = eventArgument;
            theForm.submit();
        }
    }
    function openwin() {
        
         showModalDialog("OrganizationsUpdateManager.htm","example04","dialogWidth:850px;dialogHeight:300px;dialogLeft:200px;dialogTop:150px;center: yes;help:yes;resizable:yes;status:yes")
     }


function  sum() {
    var userID='${userID}';
    alert(userID);
   	var checks=document.getElementsByName("mcheck");
    var names=document.getElementsByName("iid");
    var list1 = new Array();
    var z=0; 
    for(var i=0;i<checks.length;i++){
    if(checks[i].checked){
       
      var name=names[i].value;
      
        list1[z]=name;
        z=z+1; 
       
    }
    }
    
     if(confirm("确定收回用户该权限吗？")){
          location.href="todelQX.do?list1="+list1+"&userID="+userID;
          
    }
    /*  alert(item);  */
 }

</script>
 
 

     <div style="background: #EFF3FF; width: 22%; float: left; overflow-y: auto;">
    <div id="tree" class="tree" style="background: #EFF3FF;">
    </div>
    </div>
    <div style="width: 75%; float: left; border: 0px solid #82AFE8; padding: 5px;">
        <div>
            <table width="100%">
                <tr>
                    <td width="8%">
                       权限名：
                    </td>
                    <td width="30%" >
                        <input name="menuName" type="text" id="menuName" style="width:95%;" />
                    </td>
                    <td width="10%" >
                    <input type="submit"  value="  "style="border-style: none; border-color: inherit; border-width: 0px; background-image:url('../Images/search.gif'); width:100px; height:24px;"/>
                    </td>
                    <td align="right">
                        <input name="btnAdd" type="button" id="btnAdd" class="button" value="权限收回"  onclick="sum()"/>
                    </td>
                </tr>
            </table>
        </div>
        
        </form>
        <table width="100%" class="tablist">
            <thead id="tablistHer">
                <tr>
                <th>
                <input type="checkbox" name="" value=""/>
                    </th>
                <th width="20%">
                        权限名称
                    </th>
          
              
                </tr>
            </thead>
            <tbody id="tab">
                <c:forEach items="${wlist }" var="bean">
                
                <tr>
                <c:if test="${bean.pid!=1}">
                 <input type="hidden" name="iid" id="iid" value="${bean.menuId}" /> 
                 <td><input type="checkbox" name="mcheck" value="4"/>  </td>
                 <td>${bean.menuName }</td>
                 
                 
          
                </c:if>
                
                </tr>
                 
                 </c:forEach>
                    
            </tbody>
        </table>
        <script type="text/javascript">
<!--
            var Ptr = document.getElementById("tab").getElementsByTagName("tr");
            function pageLoad() {
                for (i = 1; i < Ptr.length + 1; i++) {
                    Ptr[i - 1].className = (i % 2 > 0) ? "t1" : "t2";
                }
            }
            window.onload = pageLoad;
            for (var i = 0; i < Ptr.length; i++) {
                Ptr[i].onmouseover = function () {
                    this.tmpClass = this.className;
                    this.className = "t3";

                };
                Ptr[i].onmouseout = function () {
                    this.className = this.tmpClass;
                };
            }
//-->
        </script>
      <div id="AspNetPager1" class="anpager" style="width:100%;text-align:left;">
         <div align="left" class="anpager" style="width:60%;float:left;">
	     <a disabled="disabled" style="margin-right:10px;">首页</a><a disabled="disabled" style="margin-right:10px;">上一页</a><span class="cpb" style="margin-right:10px;">1</span><a disabled="disabled" style="margin-right:10px;">下一页</a><a disabled="disabled" style="margin-right:10px;">尾页</a>
         </div>
         <div class="anpager" style="width:40%;float:left;">
	    记录总数：<font color="blue"><b>3</b></font> 总页数：<font color="blue"><b>1</b></font> 当前页：<font color="red"><b>1</b></font>
         </div>
      </div>
    </div>
   
    
</body>
</html>




